Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement A72: OpenTelemetry Tracing #9

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open

Implement A72: OpenTelemetry Tracing #9

wants to merge 57 commits into from

Conversation

aranjans
Copy link
Owner

@aranjans aranjans commented Nov 17, 2024

Overview

This pull request implements the OpenTelemetry tracing support in the gRPC-Go library as outlined in proposal A72. The implementation provides a robust framework for tracing gRPC calls using OpenTelemetry, facilitating a smooth migration path from OpenCensus tracing.

Key Features

  • OpenTelemetry Tracing API: Introduces a new API for enabling and configuring OpenTelemetry tracing within gRPC. This includes the addition of TraceOptions in the Options struct to allow users to specify their TraceProvider.

  • Context Propagation: Implements context propagation between gRPC clients and servers using OpenTelemetry's TextMapPropagator. This ensures that trace context is correctly passed along with RPC calls.

  • Migration Path: Provides a clear migration path from OpenCensus to OpenTelemetry, allowing users to transition their tracing implementations without breaking existing functionality. This includes support for both cross-process and in-binary migration scenarios.

  • Tracing Information: Captures detailed tracing information during the RPC lifecycle, including events for outbound and inbound messages, retries, and load balancer delays. This information is essential for monitoring and debugging distributed systems.

  • GrpcTraceBinPropagator: This is being done by @purnesh42H and PR is under review.

Implementation Details

  • TraceOptions Struct: A new struct has been added to the opentelemetry package to hold trace-related options, including the TraceProvider.

  • Event Logging: The implementation logs various events during the RPC lifecycle, such as message sizes and sequence numbers, which are crucial for understanding the flow of data through the system.

  • Interceptors: The existing gRPC infrastructure for interceptors has been leveraged to implement the tracing functionality, ensuring that the new features integrate seamlessly with the current architecture.

  • Backward Compatibility: The implementation maintains backward compatibility with existing OpenCensus tracing, allowing users to continue using the grpc-census plugin while they transition to OpenTelemetry.

RELEASE NOTES:

  • Added OpenTelemetry tracing support in gRPC-Go, enabling enhanced observability and a migration path from OpenCensus.

@aranjans aranjans force-pushed the a72 branch 10 times, most recently from 801a40f to db38566 Compare November 17, 2024 16:39
@aranjans aranjans marked this pull request as ready for review November 17, 2024 16:40
@aranjans aranjans force-pushed the a72 branch 5 times, most recently from 51ec59e to 18b1e12 Compare November 17, 2024 17:01
@aranjans aranjans force-pushed the a72 branch 3 times, most recently from 378ddd3 to 8cb8222 Compare November 21, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.